import React from 'react';
import { BrowserRouter, Route, Switch, Redirect } from 'react-router-dom';
import { Layout } from 'antd';
import { Provider } from 'react-redux';
import Draft from '../Draft';
import SignIn from '../UserInfo/signIn';
import Slam from '../Slam';
import Test from '../test';
function App({ store }) {
  return (
    <Layout style={{ height: '100vh', width: '100vw' }}>
      <Provider store={store}>
        <BrowserRouter>
          {/* <Suspense fallback={<Loading />}> */}
          <Switch>
            <Route path="/draft" children={() => <Draft />} exact />
            <Route path="/slam" children={() => <Slam />} exact />
            <Route path="/signIn" children={() => <SignIn />} exact />
            <Route path="/test" children={() => <Test />} exact />

            <Redirect path="/" exact to="/draft" />
          </Switch>
          {/* </Suspense> */}
        </BrowserRouter>
      </Provider>
    </Layout>
  );
}

export default App;



